package com.lrkj.back.service.impl;

import java.util.List;

import com.lrkj.back.mapper.TbWenjuanAnswerMapper;
import com.lrkj.back.entity.TbWenjuanAnswer;
import com.lrkj.back.service.TbWenjuanAnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.com.cbons.mamisay.parent.db.api.DBInterface;
import cn.com.cbons.mamisay.parent.exception.DBException;
import cn.com.cbons.mamisay.parent.service.base.ParentServiceImpl;

@Transactional
@Service("answerService")
public class TbWenjuanAnswerServiceImpl extends ParentServiceImpl<TbWenjuanAnswer> implements TbWenjuanAnswerService {

    @Autowired
    private TbWenjuanAnswerMapper answerMapper;

    @Override
    protected DBInterface<TbWenjuanAnswer> getDao() throws DBException {

        return answerMapper;
    }

    @Override
    public List<TbWenjuanAnswer> selectByQuestionId(Integer id) throws DBException {
        return answerMapper.selectByQustionId(id);
    }

    @Override
    public int deletebywenjuanid(int id) throws DBException {
        return answerMapper.deletebywenjuanid(id);
    }

}
